-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Added Controller Methods for making DockerImage and Downloading Files #25
base: main
Are you sure you want to change the base?
Conversation
kunxl-gg
commented
Oct 20, 2023
- Wrote method for making DockerImage
- Wrote method for Downloading files
Signed-off-by: kunxl-gg <tiwari.25@iitj.ac.in>
Signed-off-by: kunxl-gg <tiwari.25@iitj.ac.in>
Signed-off-by: kunxl-gg <tiwari.25@iitj.ac.in>
Signed-off-by: kunxl-gg <tiwari.25@iitj.ac.in>
Signed-off-by: kunxl-gg <tiwari.25@iitj.ac.in>
Signed-off-by: kunxl-gg <tiwari.25@iitj.ac.in>
Signed-off-by: kunxl-gg <tiwari.25@iitj.ac.in>
Signed-off-by: kunxl-gg <tiwari.25@iitj.ac.in>
Signed-off-by: kunxl-gg <tiwari.25@iitj.ac.in>
Signed-off-by: kunxl-gg <tiwari.25@iitj.ac.in>
Signed-off-by: kunxl-gg <tiwari.25@iitj.ac.in>
} | ||
|
||
// Build an image from a Dockerfile in the current directory | ||
buildcontext, err := os.Open("./model.tar") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wasn't the files zip?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to unzip and add the Dockerfile inside. I just made a tar after adding the Dockerfile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where are we adding the docker image and getting the tar file?
@@ -2,32 +2,48 @@ module github.com/LainForge/Neura-Launch-Dashboard/builder | |||
|
|||
go 1.21 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When did this happen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤷
return nil | ||
|
||
} | ||
|
||
|
||
func downloadFilesController(context *gin.Context) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we have the downloadFilesController ?
Bucket: aws.String(config.AWSS3Bucket), | ||
Key: aws.String("test.txt"), | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
im curious abt how this works... why "test.txt" ?
r.GET("/downloadFiles", nil) | ||
r.GET("/buildImage", nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's this for ? r.GET("/downloadFiles", nil)
} | ||
|
||
// Build an image from a Dockerfile in the current directory | ||
buildcontext, err := os.Open("./model.tar") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where are we adding the docker image and getting the tar file?
// Starting the server | ||
r.Run(":6969") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if u ever change the port here then make the necessary updates in dev, prod docker files and the dev, prod compose files. right now the docker-compose.yaml and builder.Dockerfile still exposes 5000. update that